package com.outdoor.server.mapper;

import com.github.pagehelper.Page;
import com.outdoor.pojo.dto.NodePageQueryDTO;
import com.outdoor.pojo.entity.Node;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NodeMapper {
    void insert(Node node);

    List<Node> selectByTrackId(Long trackId);

    @Select("SELECT * FROM node WHERE id = #{id}")
    Node selectById(Long id);

    /**
     * 分页查询节点信息
     * @param nodePageQueryDTO
     * @return
     */
    Page<Node> pageQuery(NodePageQueryDTO nodePageQueryDTO);
}